import java.awt.Graphics;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JPanel;


public class Panel extends JPanel {

	private Image image;
	
	public Panel(String rutaImagen) {
		super();
		image = new ImageIcon(getClass().getResource(rutaImagen)).getImage();
		this.setLayout(null);
		
	}	
	
	@Override
	public void paintComponent(Graphics g) {
		g.drawImage(image, 0, 0, this.getParent().getWidth(), this.getParent().getHeight()/*this.anchoImagen, this.altoImagen*/, null);
		setOpaque(false);
		super.paintComponent(g);
	}
	
}